"""
线索详情页面
"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage

class Clue_DetailsPage(BasePage):
    #定位器
    #修改按钮
    xs_xsxq_xg_locator = (By.LINK_TEXT, "修改")
    #删除按钮
    xs_xsxq_sc_locator = (By.LINK_TEXT, "删除")
    #沟通日志
    xs_xsxq_gtrz_locator = (By.XPATH, '//*[@id="left_list"]/li[3]/a')
    #添加成功文本
    xs_xsxq_tjcg_text_locator =(By.CSS_SELECTOR,"#tab1 > div.back_box > div")


    #点击修改按钮
    def click_xg(self):
        self.driver.find_element(*self.xs_xsxq_xg_locator).click()
    #点击删除按钮
    def click_sc(self):
        self.driver.find_element(*self.xs_xsxq_sc_locator).click()
    #点击沟通日志
    def click_gtrz(self):
        self.driver.find_element(*self.xs_xsxq_gtrz_locator).click()
    #获取添加成功后文本
    def get_table_element(self):
        return self.driver.find_element(*self.xs_xsxq_tjcg_text_locator).text.strip()
